package com.examplemartin.jpademo.dao;

import com.examplemartin.jpademo.pojo.po.repository.sell.SellOutDetailPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface SellOutDetailDao extends JpaRepository<SellOutDetailPO,Long>, JpaSpecificationExecutor<SellOutDetailPO> {

    /*// 根据 采购订单 和 商品id 产生入库数量汇总
    @Query("select sum(t1.goodcount) from t_purindetail t1,t_good good,t_pur pur where t1.purInPO.purPO.id = pur.id and t1.goodPO.id = good.id and  t1.purInPO.purPO.id = ?1 and t1.goodPO.id=?2 group by t1.purInPO.purPO.id,t1.goodPO.id")
    List<Object[]> sumGroupbyGoodidAndpurid(Long purid,Long goodid);

    @Transactional
    @Modifying(clearAutomatically = true)
    @Query("delete from t_purindetail t where t.id = ?1 ")
    public void deletePhy(Long id);*/
}
